STEP 10: Time for our last dance move! Go to and drag out Define Function.

  • Drop the new function AFTER the sway() function and BEFORE the lines that call the functions.
  • Name the function two_step().
  • Drop Say for Time INSIDE the function. The second argument controls how long the sprite will speak!
  • Change the string in .say() to "Let's dance!"

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)